import request from '@/utils/request'

// data 请求体数据
export function addBanner(data){
  return request({
    url: '/homeBanner/add',
    method: 'post',
    data: data
  })

}

// data
export function getBannerList(data){
   return request({
     url:'/homeBanner/list',
     method:'post',
     data:data
   })
}

export function updateBanner(data){
  return request({
    url: '/homeBanner/update',
    method: 'post',
    data: data
  })
}

export function deleteBanner(data){
  return request({
    url: '/homeBanner/delete',
    method: 'post',
    data: data
  })
}

export function getSectionTree(){
  return request({
    url: '/homeBanner/tree',
    method: 'get'
  })

}

export  function getBannerListBySection(category,section){
  return request({
    url: '/homeBanner/listBySection',
    method: 'post',
    data:{
       'category':category,
       'sectionName':section
    }
  })

}

export function getBannerSectionList(){
    return request({
         url:'/homeBanner/sectionList',
         method:'get'
    })
}
